home *** CD-ROM | disk | FTP | other *** search
- /* File: MPWSharedLibs.h
-
- Contains: Declarations to use MPW shared library functions.
-
- Copyright: © 1993-1994 by Apple Computer, Inc., all rights reserved.
-
-
- */
-
- #ifndef __MPWSHAREDLIBS__
- #define __MPWSHAREDLIBS__
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #define kMPWMath1FuncsID "aslm:mpw$Math1,3.3.1"
- #define kMPWMath1FuncsID "aslm:mpw$Math1,3.3.1"
- #define kMPWMath2FuncsID "aslm:mpw$Math2,3.3.1"
- #define kMPWComplexFuncsID "aslm:mpw$Complex,3.3.1"
- #define kMPWStdCLib1FuncsID "aslm:mpw$StdCLib1,3.3.1"
- #define kMPWStdCLib2FuncsID "aslm:mpw$StdCLib2,3.3.1"
-
- #define kErrnoCallbacksID "aslm:mpw$ErrnoCallbacks,3.3.1"
- #define kSystemCallbacksID "aslm:mpw$SystemCB,3.3.1"
- #define kStdIOCallbacksID "aslm:mpw$StdIOCB,3.3.1"
- #define kLocaleCallbacksID "aslm:mpw$LocaleCB,3.3.1"
-
- /*******************************************************************************
- ** CleanupMPWLibraries()
- **
- ** This routine is linked with clients of the MPW Libraries, both applications
- ** and other shared libraries. It will allow the MPW Libraries to unload when
- ** they currently are not in use by any client, but are being kept loaded
- ** because of the circular dependencies that they have on each other. Calling
- ** this routine will cause each of the MPW Libraries to do a ResetFunctionSet(NULL)
- ** so their cirucular dependencies are released. It also makes the client do a
- ** reset function set on each of the MPW Libraries. If no clients are using the
- ** MPW Libraries at this piont then they will unload.
- **
- ** Call this routine either when you are finished using the MPW Libraries or
- ** just before calling CleanupLibraryManager.
- ********************************************************************************/
-
- void CleanupMPWLibraries(void);
-
- /*******************************************************************************
- ** InitSystemCallbacks()
- **
- ** This function sets up callbacks for the following routines:
- ** malloc, free, calloc, realloc
- ** getenv, atexit, exit, _exit, signal, raise
- ** getpid, strtol, strtoul
- ** _getIOPort, _uerror, _faccess, _coRead, _coWrite (used by non-stream file I/O)
- **
- ** In addition it sets things up so that errno and MacOSErr are available to
- ** the library, if it included ASLMCLib.h
- ********************************************************************************/
-
- OSErr InitSystemCallbacks(void);
-
- /*******************************************************************************
- ** InitStdIOCallbacks()
- **
- ** This function calls InitSystemCallbacs, then sets up callbacks for the
- ** following routines:
- ** perror, __assertprint, fflush, gets, puts, scanf, printf, vprintf
- ** _filbuf, _findbuf, _findiop
- **
- ** In addition it sets things up so that errno and MacOSErr are available to
- ** the library, if it included ASLMCLib.h.
- ** It also sets things up so that stdin, stdout, and stderr are available to
- ** the library, if it included ASLMCLib.h
- ********************************************************************************/
-
- OSErr InitStdIOCallbacks(void);
-
-
- /*******************************************************************************
- ** InitLocaleCallbacks()
- **
- ** This function sets up callbacks for the following routines:
- ** localeconv, setlocale, strftime
- **
- ** In addition it sets things up so that errno and MacOSErr are available to
- ** the library, if it included ASLMCLib.h.
- ********************************************************************************/
-
- OSErr InitLocaleCallbacks(void);
-
- #ifdef __cplusplus
- };
- #endif
-
- #endif